<template>
  <!-- 所有的内容要被根节点包含起来 -->
  <div id="home">
    <v-header
      activeClass="1"
      :tcxs="tcxs"
      v-on:childByValue="childByValue"
    ></v-header>
    <div data-v-3af161fe="" class="box">
      <div
        data-v-1e81521f=""
        data-v-3af161fe=""
        dir=""
        class="router-view appDetailsContainer"
      >
        <div data-v-1e81521f="" class="backToDetail" @click="$router.go(-1)">
          <img
            data-v-1e81521f=""
            src=""
            alt=""
            class="arrow"
          />
          <div data-v-1e81521f="" class="back">返回</div>
        </div>
        <div data-v-1e81521f="" class="componentContainer">
          <div data-v-c342d8fc="" data-v-1e81521f="">
            <div data-v-c342d8fc="" class="detailheadcard">
              <img
                data-v-c342d8fc=""
                :src="detail.cover"
                onerror='this.style.background="#f2f2f2"'
                alt=""
                class="left_logo"
              />
              <div data-v-c342d8fc="" class="center_info">
                <div data-v-c342d8fc="" class="title">{{ detail.name }}</div>
                <div data-v-c342d8fc="" class="tip">
                  <div data-v-c342d8fc="" class="tip_item">
                    <div data-v-c342d8fc="">{{ detail.categoryName }}</div>
                    <!-- <div data-v-c342d8fc="" class="circle"></div> -->
                  </div>
                  <!-- <div data-v-c342d8fc="" class="tip_item">
                  <div data-v-c342d8fc="">病毒检测</div>
                  <div data-v-c342d8fc="" class="circle"></div>
                </div>
                <div data-v-c342d8fc="" class="tip_item">
                  <div data-v-c342d8fc="">人工复检</div>
                  <div data-v-c342d8fc="" class="circle"></div>
                </div>
                <div data-v-c342d8fc="" class="tip_item">
                  <div data-v-c342d8fc="">绿色应用</div>
                </div> -->
                </div>
                <!---->
                <div data-v-c342d8fc="" class="center_info_bottom">
                  <div data-v-c342d8fc="" class="score">
                    <div data-v-f8fa9bf8="" class="newStarBox">
                      <span class="star stargrey">
                        <span
                          class="star starlight"
                          :style="{
                            width:
                              detail.star == 0
                                ? '0%'
                                : '' || detail.star == 1
                                ? '17.348248862%'
                                : '' || detail.star == 2
                                ? '37.348248862%'
                                : '' || detail.star == 3
                                ? '57.348248862%'
                                : '' || detail.star == 4
                                ? '77.348248862%'
                                : '' || detail.star == 5
                                ? '100%'
                                : ''
                          }"
                        ></span>
                      </span>
                    </div>
                  </div>
                  <div data-v-c342d8fc="" class="downloads">
                    <span data-v-c342d8fc="" class="key"
                      >{{ detail.downTimes }}次安装</span
                    >
                  </div>
                  <!-- <div data-v-c342d8fc="" class="grade">
                  <div data-v-c342d8fc="" class="row2 small_font">年满 3 周岁</div>
                </div> -->
                </div>
              </div>
              <div
                data-v-c342d8fc=""
                class="right_install"
                @click="download(detail.id)"
              >
                <a data-v-c342d8fc="" class="right_install_text">安装</a>
              </div>
              <!---->
              <div data-v-585dc428="" data-v-c342d8fc="" style="display: none;">
                <div data-v-585dc428="" class="InstallPopup">
                  <div data-v-585dc428="" class="tab-loading">
                    <div data-v-12de4ad8="" data-v-585dc428="">
                      <span data-v-12de4ad8="" class="loading"></span>
                    </div>
                  </div>
                  <!---->
                  <!---->
                  <!---->
                </div>
                <!---->
              </div>

              <div data-v-4944ac67="" class="AppInfoPopup" v-if="qx">
                <div data-v-4944ac67="" class="header">
                  <div data-v-4944ac67="">应用权限</div>
                  <img
                    data-v-4944ac67=""
                    src=""
                    alt=""
                    class="close"
                    @click="qxc"
                  />
                </div>
                <div data-v-4944ac67="" class="content">
                  <div data-v-4944ac67="" class="item">
                    <div data-v-4944ac67="" class="item_title">
                      检测出此应用获取 14 个敏感隐私权限：
                    </div>
                    <div data-v-4944ac67="" class="item_content">
                      <div data-v-4944ac67="" class="item_content_item">
                        <p>
                          1.新建/修改/删除日历<br />2.读取日历<br />3.访问大致位置信息（使用网络进行定位）<br />4.应用使用情况<br />5.录制音频<br />6.读取联系人<br />7.查找设备上的帐号<br />8.显示在其他应用上面<br />9.修改或删除存储卡中的内容<br />10.访问确切位置信息（使用GPS
                          和网络进行定位）<br />11.相机<br />12.读取存储卡中的内容<br />13.读取通话状态和移动网络信息<br />14.修改系统设置
                        </p>
                      </div>
                    </div>
                  </div>
                  <div data-v-4944ac67="" class="item">
                    <div data-v-4944ac67="" class="item_title">
                      敏感隐私权限用途说明：
                    </div>
                    <div data-v-4944ac67="" class="item_content">
                      <div data-v-4944ac67="" class="item_content_item">
                        <p>
                          1.允许应用新建、修改、删除或发起邀请他人的日历活动。<br />2.允许应用读取、保存、分享本机存储的您或他人发起的所有日历数据。<br />3.允许应用基于基站、
                          Wi-Fi等网络源获取位置信息。<br />4.获取应用的使用情况<br />5.允许应用录制音频。<br />6.允许应用读取、保存、分享电话及邮件联系人的相关数据。<br />7.允许应用获取设备已安装应用的帐户列表。<br />8.显示弹框、全屏界面到其他应用上面<br />9.允许应用修改或删除存储卡上的照片、媒体内容和文件。<br />10.允许应用基于GPS、基站、Wi-Fi等网络源获取位置信息。这可能会增加耗电量。<br />11.允许应用拍摄照片和视频。<br />12.允许应用读取存储卡上的照片、媒体内容和文件。<br />13.允许应用获取本机号码、通话状态以及拨打的号码。<br />14.修改设置应用中的设置项
                        </p>
                      </div>
                    </div>
                  </div>
                  <div
                    data-v-4944ac67=""
                    class="item no_bottom_border"
                    style="display: none;"
                  >
                    <div data-v-4944ac67="" class="item_title">权限</div>
                    <div data-v-4944ac67="" class="item_content">
                      <div data-v-4944ac67="" class="item_content_item"></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <!---->
          </div>
          <div
            data-v-1e81521f=""
            appid="C20911"
            score="2.8"
            downloads="42亿"
            commentcount=""
            deep-link-params="[object Object]"
            ctype="0"
            appprice="0"
          >
            <div class="detailscreencard typeS">
              <swiper
                :options="swiperOption"
                ref="mySwiper"
                style="cursor: grab;"
              >
                <swiper-slide v-for="item in pictures" :key="item.id"
                  ><img :src="item" class="noReversal"
                /></swiper-slide>
                <!-- <swiper-slide><img src="../../assets/2.jpg" class="noReversal"></swiper-slide>
  <swiper-slide><img src="../../assets/3.jpg" class="noReversal"></swiper-slide>
  <swiper-slide><img src="../../assets/4.jpg" class="noReversal"></swiper-slide> -->

                <div class="swiper-scrollbar" slot="scrollbar"></div>
              </swiper>

              <!---->
              <!---->
            </div>
            <!-- Swiper JS -->

            <!-- Initialize Swiper -->
            <!-- <script>
            var swiper = new Swiper('.swiper-container', {
              slidesPerView: 2,
              autoplay: true,
              spaceBetween: 16,

              scrollbar: {
                el: '.swiper-scrollbar',
              },

              // loop: true,


            });
          </script> -->
          </div>
          <div
            data-v-1e81521f=""
            appid="C20911"
            score="2.8"
            downloads="42亿"
            commentcount=""
            deep-link-params="[object Object]"
            ctype="0"
            appprice="0"
          >
            <div class="detaileditorrecommendcard">
              <div class="title">{{ detail.subtitle }}</div>
            </div>
            <!---->
          </div>
          <div v-if="detail.updateDescription">
            <div data-v-27bac63c="" class="detailprizecard">
              <div data-v-27bac63c="" class="title">更新</div>
              <div data-v-27bac63c="" class="openAndHide">
                <div data-v-27bac63c="" :class="a1 ? 'left' : 'active'">
                  <div v-html="detail.updateDescription"></div>
                </div>
              </div>
              <div
                data-v-27bac63c=""
                class="open"
                v-if="a1"
                @click="a1c"
                style=""
              >
                <span data-v-27bac63c=""></span>
                展开
              </div>
              <div data-v-27bac63c="" class="hide" v-if="!a1" @click="a1c">
                <span data-v-27bac63c=""></span>
                收起
              </div>
            </div>
            <!---->
          </div>
          <div
            data-v-9a523516=""
            data-v-1e81521f=""
            appid="C20911"
            score="2.8"
            downloads="42亿"
            commentcount=""
            deep-link-params="[object Object]"
            ctype="0"
            appprice="0"
          >
            <div data-v-9a523516="" class="detailappintrocard">
              <div data-v-9a523516="" class="title">应用介绍</div>
              <div data-v-9a523516="" class="openAndHide">
                <div data-v-9a523516="" :class="a2 ? 'left' : 'active'">
                  <div v-html="detail.description"></div>
                </div>
              </div>
              <div data-v-9a523516="" class="open" v-if="a2" @click="a2c">
                <span data-v-9a523516=""></span>
                展开
              </div>
              <div data-v-9a523516="" class="hide" v-if="!a2" @click="a2c">
                <span data-v-9a523516=""></span>
                收起
              </div>
            </div>
            <!---->
          </div>
          <div
            data-v-1286cb6a=""
            data-v-1e81521f=""
            appid="C20911"
            score="2.8"
            downloads="42亿"
            commentcount=""
            deep-link-params="[object Object]"
            ctype="0"
            appprice="0"
          >
            <div data-v-1286cb6a="" class="pcappinfocard">
              <div data-v-1286cb6a="" class="title">应用信息</div>
              <div data-v-1286cb6a="" class="detailInfo">
                <div data-v-1286cb6a="" class="left">
                  <div data-v-1286cb6a="" class="appSingleInfo">
                    <div data-v-1286cb6a="" class="info_key">资费</div>
                    <div data-v-1286cb6a="" class="info_val">免费</div>
                  </div>
                  <div data-v-1286cb6a="" class="appSingleInfo">
                    <div data-v-1286cb6a="" class="info_key">大小</div>
                    <div data-v-1286cb6a="" class="info_val">
                      {{ (detail.packageSize / 1024 / 1024).toFixed(2) }}MB
                    </div>
                  </div>
                  <div data-v-1286cb6a="" class="appSingleInfo">
                    <div data-v-1286cb6a="" class="info_key">版本</div>
                    <div data-v-1286cb6a="" class="info_val">
                      {{ detail.versionName }}
                    </div>
                  </div>

                  <!---->
                </div>
                <div data-v-1286cb6a="" class="right">
                  <div data-v-1286cb6a="" class="appSingleInfo">
                    <div data-v-1286cb6a="" class="info_key">更新时间</div>
                    <div data-v-1286cb6a="" class="info_val">
                      {{ detail.createTime }}
                    </div>
                  </div>
                  <!-- <div data-v-1286cb6a="" class="appSingleInfo">
                    <div data-v-1286cb6a="" class="info_key">应用分级</div>
                    <div data-v-1286cb6a="" class="info_val">年满 3 周岁</div>
                  </div> -->
                  <div data-v-1286cb6a="" class="appSingleInfo">
                    <div data-v-1286cb6a="" class="info_key">开发者</div>
                    <div data-v-1286cb6a="" class="info_val">
                      扬州航盛科技有限公司
                    </div>
                  </div>
                  <!-- <div data-v-1286cb6a="" class="appSingleInfo mouse_pointer">
                  <div data-v-1286cb6a="" class="info_key">隐私政策</div>
                  <div data-v-1286cb6a="" class="info_val withArrow"><img data-v-1286cb6a=""
                      src=""
                      alt="" class="arrow">
                  
                  </div>
                </div> -->
                  <div
                    data-v-1286cb6a=""
                    class="appSingleInfo mouse_pointer jmouse_pointer"
                    @click="qxc"
                  >
                    <div data-v-1286cb6a="" class="info_key">应用权限</div>
                    <div data-v-1286cb6a="" class="info_val withArrow">
                      <span data-v-1286cb6a="">权限</span>
                      <img
                        data-v-1286cb6a=""
                        src=""
                        alt=""
                        class="arrow"
                      />
                      <!---->
                    </div>
                  </div>
                </div>
              </div>
              <!---->
            </div>
            <!---->
          </div>
          <div v-if="detail.aboutRecommend">
            <div data-v-f56b9916="" class="top">
              <span data-v-f56b9916="" class="left hwtext_65st">相关推荐</span>

              <!-- <span
              data-v-f56b9916="" class="right">
              查看更多
              <img data-v-f56b9916=""
                src=""
                class="arrow"></span> -->
            </div>
            <div data-v-f56b9916="" class="bottom">
              <div
                data-v-f56b9916=""
                class="item both_ends_positive"
                v-for="(item, index) in detail.aboutRecommend"
                :key="item.id"
              >
                <div data-v-f56b9916="">
                  <img
                    data-v-f56b9916=""
                    :src="item.cover"
                    onerror='this.style.background="#f2f2f2"'
                    alt=""
                    class="img"
                    @click="requestData2(item.id)"
                  />

                  <span
                    data-v-f56b9916=""
                    class="label"
                    @click="requestData2(item.id)"
                    >{{ item.name }}</span
                  >
                  <button
                    data-v-f56b9916=""
                    class="buttom"
                    @click="download(item.id)"
                  >
                    <div data-v-f56b9916="" class="buttom_text hwtext_65st">
                      安装
                    </div>
                  </button>
                </div>
              </div>
            </div>
            <div data-v-585dc428="" data-v-f56b9916="" style="display: none;">
              <div data-v-585dc428="" class="InstallPopup">
                <div data-v-585dc428="" class="tab-loading">
                  <div data-v-12de4ad8="" data-v-585dc428="">
                    <span data-v-12de4ad8="" class="loading"></span>
                  </div>
                </div>
                <!---->
                <!---->
                <!---->
              </div>
              <!---->
            </div>
          </div>
          <div v-if="detail.aboutWeekTop">
            <div data-v-f56b9916="" class="top">
              <span data-v-f56b9916="" class="left hwtext_65st"
                >本周热门的{{ detail.categoryName }}应用</span
              >

              <!-- <span
              data-v-f56b9916="" class="right">
              查看更多
              <img data-v-f56b9916=""
                src=""
                class="arrow"></span> -->
            </div>
            <div data-v-f56b9916="" class="bottom">
              <div
                data-v-f56b9916=""
                class="item both_ends_positive"
                v-for="(item, index) in detail.aboutWeekTop"
                :key="item.id"
              >
                <div data-v-f56b9916="">
                  <img
                    data-v-f56b9916=""
                    :src="item.cover"
                    onerror='this.style.background="#f2f2f2"'
                    alt=""
                    class="img"
                    @click="requestData2(item.id)"
                  />

                  <span
                    data-v-f56b9916=""
                    class="label"
                    @click="requestData2(item.id)"
                    >{{ item.name }}</span
                  >
                  <button
                    data-v-f56b9916=""
                    class="buttom"
                    @click="download(item.id)"
                  >
                    <div data-v-f56b9916="" class="buttom_text hwtext_65st">
                      安装
                    </div>
                  </button>
                </div>
              </div>
            </div>
            <div data-v-585dc428="" data-v-f56b9916="" style="display: none;">
              <div data-v-585dc428="" class="InstallPopup">
                <div data-v-585dc428="" class="tab-loading">
                  <div data-v-12de4ad8="" data-v-585dc428="">
                    <span data-v-12de4ad8="" class="loading"></span>
                  </div>
                </div>
                <!---->
                <!---->
                <!---->
              </div>
              <!---->
            </div>
            <div data-v-f56b9916="" class="mask" v-if="qx" @click="qxc"></div>
          </div>
          <div
            data-v-f56b9916=""
            data-v-1e81521f=""
            dir="ltr"
            class="horizonhomecard"
            appid="C20911"
            score="2.8"
            downloads="42亿"
            commentcount=""
            deep-link-params="[object Object]"
            ctype="0"
            appprice="0"
            style="display:none"
          >
            <div data-v-f56b9916="" class="top">
              <span data-v-f56b9916="" class="left hwtext_65st"
                >同开发者的其他应用</span
              >

              <!-- <span
              data-v-f56b9916="" class="right">
              查看更多
              <img data-v-f56b9916=""
                src=""
                class="arrow"></span> -->
            </div>
            <div data-v-f56b9916="" class="bottom">
              <div data-v-f56b9916="" class="item both_ends_positive">
                <div data-v-f56b9916="">
                  <img
                    data-v-f56b9916=""
                    src="https://appimg.dbankcdn.com/application/icon144/97a68f1c8083463b88ec3d94b803195a.png"
                    onerror='this.style.background="#f2f2f2"'
                    alt=""
                    class="img"
                  />
                  <span data-v-f56b9916="" class="label">深圳出租司机端</span>
                  <button
                    data-v-f56b9916=""
                    class="buttom"
                    @click="download(item.id)"
                  >
                    <div data-v-f56b9916="" class="buttom_text hwtext_65st">
                      安装
                    </div>
                  </button>
                </div>
              </div>
              <div data-v-f56b9916="" class="item both_ends_positive">
                <div data-v-f56b9916="">
                  <img
                    data-v-f56b9916=""
                    src="https://appimg.dbankcdn.com/application/icon144/234280e1a19c4966a49a89a13e08dbb1.png"
                    onerror='this.style.background="#f2f2f2"'
                    alt=""
                    class="img"
                  />
                  <span data-v-f56b9916="" class="label">天津出租司机端</span>
                  <button data-v-f56b9916="" class="buttom">
                    <div data-v-f56b9916="" class="buttom_text hwtext_65st">
                      安装
                    </div>
                  </button>
                </div>
              </div>
              <div data-v-f56b9916="" class="item both_ends_positive">
                <div data-v-f56b9916="">
                  <img
                    data-v-f56b9916=""
                    src="https://appimg.dbankcdn.com/application/icon144/f26d9c8da0e64128bb1da547229953c0.png"
                    onerror='this.style.background="#f2f2f2"'
                    alt=""
                    class="img"
                  />
                  <span data-v-f56b9916="" class="label">好的出租联盟</span>
                  <button data-v-f56b9916="" class="buttom">
                    <div data-v-f56b9916="" class="buttom_text hwtext_65st">
                      安装
                    </div>
                  </button>
                </div>
              </div>
              <div data-v-f56b9916="" class="item both_ends_positive">
                <div data-v-f56b9916="">
                  <img
                    data-v-f56b9916=""
                    src="https://appimg.dbankcdn.com/application/icon144/4671853aaf8346b893387583483b5473.png"
                    onerror='this.style.background="#f2f2f2"'
                    alt=""
                    class="img"
                  />
                  <span data-v-f56b9916="" class="label">惠州出租司机端</span>
                  <button data-v-f56b9916="" class="buttom">
                    <div data-v-f56b9916="" class="buttom_text hwtext_65st">
                      安装
                    </div>
                  </button>
                </div>
              </div>
              <div data-v-f56b9916="" class="item both_ends_positive">
                <div data-v-f56b9916="">
                  <img
                    data-v-f56b9916=""
                    src="https://appimg.dbankcdn.com/application/icon144/3cbb5bdb824c4d3ca0fca95e46d2d335.png"
                    onerror='this.style.background="#f2f2f2"'
                    alt=""
                    class="img"
                  />
                  <span data-v-f56b9916="" class="label">天津出租</span>
                  <button data-v-f56b9916="" class="buttom">
                    <div data-v-f56b9916="" class="buttom_text hwtext_65st">
                      安装
                    </div>
                  </button>
                </div>
              </div>
            </div>
            <div data-v-585dc428="" data-v-f56b9916="" style="display: none;">
              <div data-v-585dc428="" class="InstallPopup">
                <div data-v-585dc428="" class="tab-loading">
                  <div data-v-12de4ad8="" data-v-585dc428="">
                    <span data-v-12de4ad8="" class="loading"></span>
                  </div>
                </div>
                <!---->
                <!---->
                <!---->
              </div>
              <!---->
            </div>
          </div>
          <!---->
        </div>
        <!---->
        <div data-v-1e81521f="" style="display: none;">
          <img data-v-1e81521f="" src="" alt="" />
        </div>
        <div
          data-v-17bc476a=""
          data-v-1e81521f=""
          id="container"
          class="gv-popmask_con"
          style="overflow: auto; height: 100%; display: none;"
        >
          <div data-v-17bc476a="" id="gvPopup" class="gv-popup gv-popup_center">
            <div data-v-17bc476a="">
              <p
                data-v-17bc476a=""
                id="content"
                class="gvp-nocontent-shortmsg"
                style="text-align: center;"
              ></p>
            </div>
            <div data-v-17bc476a="" class="gvp-foot-dialog">
              <table data-v-17bc476a="" style="text-align: center;">
                <colgroup data-v-17bc476a="">
                  <col data-v-17bc476a="" />
                  <col data-v-17bc476a="" style="width: 1px;" />
                  <col data-v-17bc476a="" />
                </colgroup>
                <tbody data-v-17bc476a="">
                  <!---->
                </tbody>
              </table>
            </div>
          </div>
        </div>
      </div>
      <!---->
      <!---->
    </div>

    <v-footer></v-footer>
  </div>
</template>
<script>
//引入底部头部组件
import Header from "../common/Header.vue";
import Footer from "../common/Footer.vue";

import { Swiper, SwiperSlide } from "vue-awesome-swiper";
import "swiper/css/swiper.css";
import axios from "axios";
import qs from "qs";
export default {
  data() {
    return {
      a1: true,
      a2: true,
      qx: false,
      detail: "",
      user: "",
      tcxs: false,
      swiperOption: {
        slidesPerView: "auto",
        // centeredSlides: true,
        // spaceBetween: 30,

        // API
        // slidesPerView:2,
        spaceBetween: 16,
        // loop: true,
        // autoplay:true,

        scrollbar: {
          el: ".swiper-scrollbar"
        }
      },
      pictures: []
      // utoken:((localStorage.getItem("USER_TOKEN")).replace('"', '')).replace('"', '')
    };
  },
  mounted() {
    var aid = this.$route.query.id;
    console.log("aid:", aid);
    //调用请求数据的方法
    this.requestData(aid);
  },
  methods: {
    // 下载
    childByValue: function(childValue) {
      this.tcxs = childValue;
    },
    dl(id) {
      this.download(id);
    },

    dlssss(id) {
      if (this.getCookie("user")) {
        this.user = JSON.parse(this.getCookie("user"));
        console.log("user:", this.user);
        var data = {
          appId: id,
          userId: this.user.id
        };
        this.$http({
          url: `/api/appstore/app/downLoad`,
          method: "post",
          headers: {
            "Content-Type": "application/x-www-form-urlencoded"
          },
          data: qs.stringify(data)
        })
          .then(res => {
            if (res.data.code == "1") {
              window.open(res.data.datas, "_self");
            } else {
              this.formmsg = res.data.msg;
            }
          })
          .catch(function(error) {});
      } else {
        this.tcxs = !this.tcxs;
      }
    },

    requestData2(a) {
      console.log("header:", a);
      this.$router.push({
        path: "/detail",
        query: { id: a }
      });
    },
    requestData(aid) {
      var data = {
        appId: aid
      };
      this.$http({
        url: `/api/appstore/app/appDetail`,
        method: "post",
        headers: {
          // "Authentication":this.utoken,
          "Content-Type": "application/x-www-form-urlencoded"
        },
        data: qs.stringify(data)
      })
        .then(res => {
          // console.log("申请：",res);
          if (res.data.code == "1") {
            this.detail = res.data.datas;
            this.pictures = this.detail.pictures
              .substring(0, this.detail.pictures.lastIndexOf(","))
              .split(",");
            console.log("detail:", this.detail);
            window.scrollTo(0, 0);
          } else {
            this.formmsg = res.data.msg;
          }
        })
        .catch(function(error) {
          // console.log("aaa:",error);
          // if(error == "Error: Request failed with status code 401"){
          //   _this.formmsg = "您的账号在其他设备登录账号信息已过期请重新登录";
          //   //  localStorage.removeItem("USER_TOKEN");
          //   //  _this.sfdl = false;
          //   console.log(2222);
          //   }
        });
      // var api='http://www.phonegap100.com/appapi.php?a=getPortalArticle&aid='+aid;
      // this.$http.get(api).then((response)=>{
      //         console.log(response);
      //       this.detail=response.data.result[0];  //根据数据结构赋值
      // },(err)=>{
      //     console.log(err)
      // })
    },

    a1c() {
      this.a1 = !this.a1;
    },
    a2c() {
      this.a2 = !this.a2;
    },
    qxc() {
      this.qx = !this.qx;
    },
    run() {
      alert(this.msg);
    }
  },

  watch: {
    $route() {
      console.log(111111);

      if (this.$route.query.id) {
        this.id = this.$route.query.id;
        this.requestData(this.id);
      }
    }
  },

  computed: {
    swiper() {
      return this.$refs.mySwiper.$swiper;
    }
    // 提供一个可操作的swiper对象
  },
  components: {
    "v-header": Header,
    "v-footer": Footer,
    Swiper,
    SwiperSlide
  }
};
</script>

<style lang="css" scoped>
/* css 局部作用域 scoped*/
h2 {
  color: red;
}
</style>
